package cn.py.boot_lua.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class OrderService {

    @Async("taskExecutor")
    public void createOrderAsync(String productId, String userId) {
        // 模拟异步写入数据库或发 MQ
        System.out.println("异步创建订单：用户=" + userId + ", 商品=" + productId);
    }
}
